HEAD ======= >>>>>>> 8c8a740b2768e7c450af85ace180489785115091
Testing output of the coding.
<<<<<<< HEAD## Loading the packages and setting adjustment
suppressMessages(source('function/libs.R'))
=======
## Loading the packages and setting adjustment
suppressMessages(source(paste0(getwd(),'/function/libs.R')))## Read the datasets Refer to **Testing efficiency of coding.Rmd** at chunk
## `get-data-summary-table-2.1`
years <- seq(2011, 2015)
## Here I take the majority leagues setting profile which are 'league-10-12'
## fMYPriceB = Back with vigorish price; fMYPriceL = Lay with vigorish price
## Here we term as Fair Odds
lProfile <- c(AH = 0.1, OU = 0.12)
mbase <- readfirmDatasets(years = years) %>% arrfirmDatasets(., lProfile = lProfile)
## In order to analyse the AHOU, here I need to filter out all soccer matches
## other than AHOU. (For example : Corners, Total League Goals etc.) the
## stakes amount display as $1 = $10,000
#'@ mbase$datasets[!(mbase$datasets$Home %in% mbase$corners)|!(mbase$datasets$Away %in% mbase$corners),]
dat <- mbase$datasets %>% filter((!Home %in% mbase$others) | (!Away %in% mbase$others)) %>%
mutate(Stakes = Stakes/10000, Return = Return/10000, PL = PL/10000, Month = month(ymd(Date),
label = TRUE))
#'@ pander(head(dat)) # exactly same layout with kable(x)
#'@ kable(head(dat)) ## example of the dataset in the research paper
<<<<<<< HEAD
dat %>% datatable(., caption = "Table 2.1.1 : Firm A Staking Data", extensions = c("ColReorder",
"ColVis", "TableTools"), options = list(dom = "TC<\"clear\">rlfrtip", colVis = list(exclude = c(0),
activate = "mouseover"), tableTools = list(sSwfPath = copySWF(pdf = TRUE)),
scrollX = TRUE, scrollCollapse = TRUE))